package com.leyantech.ecp.agenx.common.message;

import io.vertx.core.json.JsonObject;

/**
 * @author eahau, {@literal <eahau@foxmail.com>}
 * @date 2022-11-23.
 */
public final class MessageHelper {

  public static JsonObject buildMessage(EnumWsFnType fn, JsonObject body) {
    return new JsonObject()
        .put("header",
            new JsonObject()
                .put("fn", fn.type)
                .put("ts", System.currentTimeMillis())
        )
        .put("body", body);
  }

}
